package day04.niming;

public class Nm01 {
    public static void main(String[] args) {
        new Inter() {

            @Override
            public void show() {
                System.out.println("show方法");
            }
        }.show();
        Inter2 i=new Inter2() {
            @Override
            public void show1() {
                System.out.println("我是谁");
            }

            @Override
            public void show2() {
                System.out.println("我在哪");
            }
        };
        i.show1();
        i.show2();

    }
}

interface Inter {
    void show();
}
interface Inter2{
    void show1();
    void show2();
}

class InterImpl implements Inter {

    @Override
    public void show() {
        System.out.println("InterImpl 重写的方法");
    }
}
